<template>
  
       <div class="tab_body" v-if="userDetail.invite_list.length != 0">
        <div v-for="(item, index) of userDetail.invite_list" :key="index" class="invite_box">
          <div>
            邀请名称： {{ item.invite_name }}
          </div>
          <div>
            邀请时间： {{ item.created_at }}
          </div>
        </div>
      </div>
      <div v-if="userDetail.invite_list.length == 0" class="empty_box"> 
        <a-empty  description="暂无邀请"/>
      </div> 
</template>

<script lang="ts" setup>
import { AntDesignOutlined } from "@ant-design/icons-vue";
import { reactive, ref, onMounted } from 'vue';
import { useRouter } from "vue-router";
import { message } from "ant-design-vue";
import { getUserInfo, myInvite } from "@/api/user/index"

const userDetail = reactive({
 publish_count: 0, invite_list: [] as any[],
})  

onMounted(() => {
    
    
  getMyInvite()
})
const getMyInvite = async () => {
  const res = await myInvite({
    page: 1,
    limit: 10,
  })
  if (res.data.code != 0)
    return message.error({
      content: res.data.msg,
    });
  userDetail.invite_list = res.data.data.data
}
</script>
<style scoped>
  .empty_box {
    width: 100%;
    text-align: center;
     height: 500px;
     display: flex;
     justify-content: center;
     align-items: center;
  }
</style>